package test.client.support.balancer;

import java.util.List;

import test.domain.environment.node.Server;

public class RoundRobinLoadBalancer implements LoadBalancer {
	private List<Server> servers;
	private int count = 0;

	@Override
	public Server getServer() {
		if (count >= servers.size()) count = 0;
		return servers.get(count++);
	}

	public LoadBalancer setServers(List<Server> servers) {
		this.servers = servers;
		return this;
	}
}
